import 'package:yurun_smartmerchants/models/home_consumer_type_entity.dart';

homeConsumerTypeEntityFromJson(HomeConsumerTypeEntity data, Map<String, dynamic> json) {
	if (json['subjectNo'] != null) {
		data.subjectNo = json['subjectNo']?.toString();
	}
	if (json['phone'] != null) {
		data.phone = json['phone']?.toString();
	}
	if (json['owned'] != null) {
		data.owned = json['owned'];
	}
	if (json['consumerId'] != null) {
		data.consumerId = json['consumerId']?.toInt();
	}
	if (json['name'] != null) {
		data.name = json['name']?.toString();
	}
	if (json['auditStatus'] != null) {
		data.auditStatus = json['auditStatus']?.toInt();
	}
	if (json['type'] != null) {
		data.type = json['type']?.toInt();
	}
	if (json['url'] != null) {
		data.url = json['url']?.toString();
	}
	return data;
}

Map<String, dynamic> homeConsumerTypeEntityToJson(HomeConsumerTypeEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['subjectNo'] = entity.subjectNo;
	data['phone'] = entity.phone;
	data['owned'] = entity.owned;
	data['consumerId'] = entity.consumerId;
	data['name'] = entity.name;
	data['auditStatus'] = entity.auditStatus;
	data['type'] = entity.type;
	data['url'] = entity.url;
	return data;
}